home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2000 #5
/
Amiga Plus CD - 2000 - No. 5.iso
/
Tools
/
Dev
/
FPSE_src
/
runtime.c
< prev
next >
Wrap
C/C++ Source or Header
|
2000-01-01
|
707b
|
42 lines
/*
FPSE runtime functions
======================
Written by BERO
*/
#include "fpse.h"
void rfe(void)
{
SR = (SR & ~0xf)| ((SR>>2)&0xf);
PRINTF("rfe:%x\n",(int)(SR));
}
UINT32 exception(int cd,UINT32 pc)
{
// if (cd == E_Bp*4) cd = E_Sys*4; // Avoid break opcode
PRINTF("Exception:%x %x\n",cd,(int)pc);
EPC=pc;
//CAUSE = (CAUSE & ~0x3c) | cd;
CAUSE = cd;
SR = (SR & ~0x3f)| ((SR<<2)&0x3f);
return jmppc(0x80000080);
}
void compile_go(void)
{
void (*func)();
func = (void *)jmppc(PC);
func();
}
void go(void)
{
int x;
while (!stop) {
if (update_counter()) Interrupt();
for (x=0;x<16;x++) doInst();
}
}